home *** CD-ROM | disk | FTP | other *** search
Wrap
/* graphics: public graphics error equates by Cary Clark, Georgiann Delaney, Herb Derby, Michael Fairman, Pablo Fernicola, Dave Good, Josh Horwich, Barton House, Robert Johnson, Keith McGreggor, Mike Reed, Oliver Steele, David Van Brink, Chris Yerga Copyright 1987 - 1994 Apple Computer, Inc. All rights reserved. */ #pragma once #ifndef graphicsErrorsIncludes #define graphicsErrorsIncludes #define gxFirstSystemError -27999 /* 0xffff92a1 */ #define gxFirstFatalError -27999 #define gxLastFatalError -27951 #define gxFirstNonfatalError -27950 #define gxFirstFontScalerError -27900 #define gxLastFontScalerError -27851 #define gxFirstParameterError -27850 #define gxFirstImplementationLimitError -27800 #define gxFirstSystemDebuggingError -27700 #define gxLastSystemError -27000 /* 0xffff9688 */ #define gxFirstLibraryError 1048576 /* 0x00100000 */ #define gxLastLibraryError 2097151 /* 0x001fffff */ #define gxFirstAppError 2097152 /* 0x00200000 */ #define gxLastAppError 4194303 /* 0x003fffff */ #define gxFirstSystemWarning -26999 /* 0xffff9689 */ #define gxFirstResultOutOfRangeWarning -26950 #define gxFirstParameterOutOfRangeWarning -26900 #define gxFirstFontScalerWarning -26850 #define gxFirstSystemDebuggingWarning -26700 #define gxLastSystemWarning -26000 /* 0xffff9a70 */ #define gxFirstLibraryWarning 4194304 /* 0x00400000 */ #define gxLastLibraryWarning 5242879 /* 0x004fffff */ #define gxFirstAppWarning 5242880 /* 0x00500000 */ #define gxLastAppWarning 7340031 /* 0x006fffff */ #define gxFirstSystemNotice -25999 /* 0xffff9a71 */ #define gxLastSystemNotice -25500 /* 0xffff9c64 */ #define gxFirstLibraryNotice 7340032 /* 0x00700000 */ #define gxLastLibraryNotice 7602175 /* 0x0073ffff */ #define gxFirstAppNotice 7602176 /* 0x00740000 */ #define gxLastAppNotice 8388607 /* 0x007fffff */ enum gxGraphicErrors { /* truly fatal errors */ out_of_memory = gxFirstFatalError, internal_fatal_error, no_outline_font_found, not_enough_memory_for_graphics_client_heap, could_not_create_backing_store, /* internal errors */ internal_error = gxFirstNonfatalError, internal_font_error, internal_layout_error, /* recoverable errors */ could_not_dispose_backing_store = internal_layout_error + 2, unflattening_interrupted_by_client, /* font manager errors */ font_cannot_be_changed, illegal_font_parameter, /* gxFont scaler errors */ null_font_scaler_context = gxFirstFontScalerError, null_font_scaler_input, invalid_font_scaler_context, invalid_font_scaler_input, invalid_font_scaler_font_data, font_scaler_newblock_failed, font_scaler_getfonttable_failed, font_scaler_bitmap_allocation_failed, font_scaler_outline_allocation_failed, required_font_scaler_table_missing, unsupported_font_scaler_outline_format, unsupported_font_scaler_stream_format, unsupported_font_scaler_font_format, font_scaler_hinting_error, font_scaler_rasterizer_error, font_scaler_internal_error, font_scaler_invalid_matrix, font_scaler_fixed_overflow, font_scaler_api_version_mismatch, font_scaler_streaming_aborted, unknown_font_scaler_error, /* bad parameters */ parameter_is_nil = gxFirstParameterError, shape_is_nil, style_is_nil, transform_is_nil, ink_is_nil, transferMode_is_nil, color_is_nil, colorProfile_is_nil, colorSet_is_nil, spoolProcedure_is_nil, tag_is_nil, type_is_nil, mapping_is_nil, invalid_viewDevice_reference, invalid_viewGroup_reference, invalid_viewPort_reference, /* implementation limits, these should be right before the debugging errors */ number_of_contours_exceeds_implementation_limit = gxFirstImplementationLimitError, number_of_points_exceeds_implementation_limit, size_of_polygon_exceeds_implementation_limit, size_of_path_exceeds_implementation_limit, size_of_text_exceeds_implementation_limit, size_of_bitmap_exceeds_implementation_limit, number_of_colors_exceeds_implementation_limit, procedure_not_reentrant #ifdef debugging , /* internal debugging errors */ functionality_unimplemented = gxFirstSystemDebuggingError, clip_to_frame_shape_unimplemented, /* font parameter debugging errors */ illegal_font_storage_type, illegal_font_storage_reference, illegal_font_attributes, /* parameter debugging errors */ parameter_out_of_range, inconsistent_parameters, index_is_less_than_zero, index_is_less_than_one, count_is_less_than_zero, count_is_less_than_one, contour_is_less_than_zero, length_is_less_than_zero, invalid_client_reference, invalid_graphics_heap_start_pointer, invalid_nongraphic_globals_pointer, colorSpace_out_of_range, pattern_lattice_out_of_range, frequency_parameter_out_of_range, tinting_parameter_out_of_range, method_parameter_out_of_range, space_may_not_be_indexed, glyph_index_too_small, no_glyphs_added_to_font, glyph_not_added_to_font, point_does_not_intersect_bitmap, required_font_table_not_present, unknown_font_table_format, /* the styles encoding is not present in the font */ shapeFill_not_allowed, inverseFill_face_must_set_clipLayer_flag, invalid_transferMode_colorSpace, colorProfile_must_be_nil, bitmap_pixel_size_must_be_1, empty_shape_not_allowed, ignorePlatformShape_not_allowed, nil_style_in_glyph_not_allowed, complex_glyph_style_not_allowed, invalid_mapping, cannot_set_item_shapes_to_nil, cannot_use_original_item_shapes_when_growing_picture, cannot_add_unspecified_new_glyphs, cannot_dispose_locked_tag, cannot_dispose_locked_shape, /* restricted access */ shape_access_not_allowed, colorSet_access_restricted, colorProfile_access_restricted, tag_access_restricted, viewDevice_access_restricted, graphic_type_does_not_have_a_structure, style_run_array_does_not_match_number_of_characters, rectangles_cannot_be_inserted_into, unknown_graphics_heap, graphics_routine_selector_is_obsolete, cannot_set_graphics_client_memory_without_setting_size, graphics_client_memory_too_small, graphics_client_memory_is_already_allocated, viewPort_is_a_window, /* wrong type/bad reference */ illegal_type_for_shape, shape_does_not_contain_a_bitmap, shape_does_not_contain_text, picture_expected, bitmap_is_not_resizable, shape_may_not_be_a_bitmap, shape_may_not_be_a_picture, graphic_type_does_not_contain_points, graphic_type_does_not_have_multiple_contours, graphic_type_cannot_be_mapped, graphic_type_cannot_be_moved, graphic_type_cannot_be_scaled, graphic_type_cannot_be_rotated, graphic_type_cannot_be_skewed, graphic_type_cannot_be_reset, graphic_type_cannot_be_dashed, graphic_type_cannot_be_reduced, graphic_type_cannot_be_inset, shape_cannot_be_inverted, shape_does_not_have_area, shape_does_not_have_length, first_glyph_advance_must_be_absolute, picture_cannot_contain_itself, viewPort_cannot_contain_itself, cannot_set_unique_items_attribute_when_picture_contains_items, layer_style_cannot_contain_a_face, layer_glyph_shape_cannot_contain_nil_styles, /* validation errors */ object_wrong_type, shape_wrong_type, style_wrong_type, ink_wrong_type, transform_wrong_type, device_wrong_type, port_wrong_type, /* validation cache errors */ shape_cache_wrong_type, style_cache_wrong_type, ink_cache_wrong_type, transform_cache_wrong_type, port_cache_wrong_type, shape_cache_parent_mismatch, style_cache_parent_mismatch, ink_cache_parent_mismatch, transform_cache_parent_mismatch, port_cache_parent_mismatch, invalid_shape_cache_port, invalid_shape_cache_device, invalid_ink_cache_port, invalid_ink_cache_device, invalid_style_cache_port, invalid_style_cache_device, invalid_transform_cache_port, invalid_transform_cache_device, recursive_caches, /* validation shape cache errors */ invalid_fillShape_ownerCount, recursive_fillShapes, /* validation memory block errors */ indirect_memory_block_too_small, indirect_memory_block_too_large, unexpected_nil_pointer, bad_address, /* validation object errors */ no_owners, invalid_pointer, invalid_seed, invalid_frame_seed, invalid_text_seed, invalid_draw_seed, bad_private_flags, /* validation path and polygon errors */ invalid_vector_count, invalid_contour_count, /* validation bitmap errors */ bitmap_ptr_too_small, bitmap_ptr_not_aligned, bitmap_rowBytes_negative, bitmap_width_negative, bitmap_height_negative, invalid_pixelSize, bitmap_rowBytes_too_small, bitmap_rowBytes_not_aligned, bitmap_rowBytes_must_be_specified_for_user_image_buffer, /* validation bitmap image errors */ invalid_bitImage_fileOffset, invalid_bitImage_owners, invalid_bitImage_rowBytes, invalid_bitImage_internal_flag, /* validation text errors */ text_bounds_cache_wrong_size, text_metrics_cache_wrong_size, text_index_cache_wrong_size, /* validation glyph errors */ glyph_run_count_negative, glyph_run_count_zero, glyph_run_counts_do_not_sum_to_character_count, glyph_first_advance_bit_set_not_allowed, glyph_tangent_vectors_both_zero, /* validation layout errors */ layout_run_length_negative, layout_run_length_zero, layout_run_level_negative, layout_run_lengths_do_not_sum_to_text_length, /* validation picture errors */ bad_shape_in_picture, bad_style_in_picture, bad_ink_in_picture, bad_transform_in_picture, bad_shape_cache_in_picture, bad_seed_in_picture, invalid_picture_count, /* validation text face errors */ bad_textLayer_count, bad_fillType_in_textFace, bad_style_in_textFace, bad_transform_in_textFace, /* validation transform errors */ invalid_matrix_flag, transform_clip_missing, /* validation font cache errors */ metrics_wrong_type, metrics_point_size_probably_bad, scalar_block_wrong_type, scalar_block_parent_mismatch, scalar_block_too_small, scalar_block_too_large, invalid_metrics_range, invalid_metrics_flags, metrics_maxWidth_probably_bad, font_wrong_type, font_wrong_size, invalid_font_platform, invalid_lookup_range, invalid_lookup_platform, font_not_in_font_list, metrics_not_in_metrics_list, /* validation view device errors */ bad_device_private_flags, bad_device_attributes, invalid_device_number, invalid_device_viewGroup, invalid_device_bounds, invalid_bitmap_in_device, /* validation color set errors */ colorSet_wrong_type, invalid_colorSet_viewDevice_owners, invalid_colorSet_colorSpace, invalid_colorSet_count, /* validation color profile errors */ colorProfile_wrong_type, invalid_colorProfile_flags, invalid_colorProfile_response_count, /* validation internal backing store errors */ backing_free_parent_mismatch, backing_store_parent_mismatch #endif }; #define common_colors_not_initialized gxFirstLibraryError #define no_open_picture (gxFirstLibraryError + 1) #define picture_already_open (gxFirstLibraryError + 2) #define no_open_poly (gxFirstLibraryError + 3) #define poly_already_open (gxFirstLibraryError + 4) #define no_open_region (gxFirstLibraryError + 5) #define region_already_open (gxFirstLibraryError + 6) #define no_active_picture (gxFirstLibraryError + 7) enum gxGraphicWarnings { /* warnings about warnings */ warning_stack_underflow = gxFirstSystemWarning, warning_stack_overflow, notice_stack_underflow, notice_stack_overflow, about_to_grow_heap, about_to_unload_objects, /* result went out of range */ map_shape_out_of_range = gxFirstResultOutOfRangeWarning, move_shape_out_of_range, scale_shape_out_of_range, rotate_shape_out_of_range, skew_shape_out_of_range, map_transform_out_of_range, move_transform_out_of_range, scale_transform_out_of_range, rotate_transform_out_of_range, skew_transform_out_of_range, map_points_out_of_range, /* gave a parameter out of range */ contour_out_of_range = gxFirstParameterOutOfRangeWarning, index_out_of_range_in_contour, picture_index_out_of_range, color_index_requested_not_found, colorSet_index_out_of_range, index_out_of_range, count_out_of_range, length_out_of_range, font_table_index_out_of_range, font_glyph_index_out_of_range, point_out_of_range, profile_response_out_of_range, /* gxFont scaler warnings */ font_scaler_no_output = gxFirstFontScalerWarning, font_scaler_fake_metrics, font_scaler_fake_linespacing, font_scaler_glyph_substitution, font_scaler_no_kerning_applied, /* might not be what you expected */ character_substitution_took_place, unable_to_get_bounds_on_multiple_devices, font_language_not_found, font_not_found_during_unflattening, /*storage */ unrecognized_stream_version, bad_data_in_stream #ifdef debugging , /* nonsense data */ new_shape_contains_invalid_data = gxFirstSystemDebuggingWarning, new_tag_contains_invalid_data, extra_data_passed_was_ignored, font_table_not_found, font_name_not_found, /* doesn't make sense to do */ unable_to_traverse_open_contour_that_starts_or_ends_off_the_curve, unable_to_draw_open_contour_that_starts_or_ends_off_the_curve, cannot_dispose_default_shape, cannot_dispose_default_style, cannot_dispose_default_ink, cannot_dispose_default_transform, cannot_dispose_default_colorProfile, cannot_dispose_default_colorSet, shape_direct_attribute_not_set, /* couldn't find what you were looking for */ point_does_not_intersect_port, cannot_dispose_non_font, face_override_style_font_must_match_style, union_of_area_and_length_returns_area_only, insufficient_coordinate_space_for_new_device, /* other */ shape_passed_has_no_bounds, tags_of_type_flst_removed, translator_not_installed_on_this_grafport #endif }; #define no_picture_drawn gxFirstLibraryWarning #define polygons_have_different_size_contours (gxFirstLibraryWarning + 1) #define graphic_type_cannot_be_specifed_by_four_values (gxFirstLibraryWarning + 2) #define graphic_type_cannot_be_specifed_by_six_values (gxFirstLibraryWarning + 3) #define point_expected (gxFirstLibraryWarning + 4) #define line_or_rectangle_expected (gxFirstLibraryWarning + 5) #define curve_expected (gxFirstLibraryWarning + 6) #define graphic_type_does_not_contain_control_bits (gxFirstLibraryWarning + 7) #define request_exceeds_available_data (gxFirstLibraryWarning + 8) #define extra_data_unread (gxFirstLibraryWarning + 9) #define no_variable_length_user_data_saved (gxFirstLibraryWarning + 10) enum gxGraphicNotices { parameters_have_no_effect = gxFirstSystemNotice, attributes_already_set, caps_already_set, clip_already_set, color_already_set, curve_error_already_set, dash_already_set, default_colorProfile_already_set, default_ink_already_set, default_transform_already_set, default_shape_already_set, default_style_already_set, dither_already_set, encoding_already_set, face_already_set, fill_already_set, font_already_set, font_variations_already_set, glyph_positions_are_already_set, glyph_tangents_are_already_set, halftone_already_set, hit_test_already_set, ink_already_set, join_already_set, justification_already_set, mapping_already_set, pattern_already_set, pen_already_set, style_already_set, tag_already_set, text_attributes_already_set, text_size_already_set, transfer_already_set, translator_already_installed_on_this_grafport, transform_already_set, type_already_set, validation_level_already_set, viewPorts_already_set, viewPort_already_in_viewGroup, viewDevice_already_in_viewGroup, geometry_unaffected, mapping_unaffected, tags_in_shape_ignored, shape_already_in_primitive_form, shape_already_in_simple_form, shape_already_broken, shape_already_joined, cache_already_cleared, shape_not_disposed, style_not_disposed, ink_not_disposed, transform_not_disposed, colorSet_not_disposed, colorProfile_not_disposed, font_not_disposed, glyph_tangents_have_no_effect, glyph_positions_determined_by_advance, transform_viewPorts_already_set, directShape_attribute_set_as_side_effect, lockShape_called_as_side_effect, lockTag_called_as_side_effect, shapes_unlocked_as_side_effect, shape_not_locked, tag_not_locked, disposed_dead_caches, disposed_live_caches, low_on_memory, very_low_on_memory, transform_references_disposed_viewPort }; #define zero_length_string_passed gxFirstLibraryNotice typedef long gxGraphicsError; typedef long gxGraphicsWarning; typedef long gxGraphicsNotice; #ifdef __cplusplus extern "C" { #endif #pragma procname gxUserError typedef void (*gxUserErrorProcPtr)(gxGraphicsError status, long refcon ); typedef gxUserErrorProcPtr gxUserErrorFunction; #pragma procname gxUserWarning typedef void (*gxUserWarningProcPtr)(gxGraphicsWarning status, long refcon ); typedef gxUserWarningProcPtr gxUserWarningFunction; #pragma procname gxUserNotice typedef void (*gxUserNoticeProcPtr)(gxGraphicsNotice staus, long refcon ); typedef gxUserNoticeProcPtr gxUserNoticeFunction; #ifdef __cplusplus } #endif #endif